package example.websocket;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Objects;

public class MeetingItem {
    @JSONField(name = "name")
    String name;

    int like =0;
    int unlike;
    @JSONField(name = "contents")
    String contents;

    public void MeetingItem()
    {

    }

    public void addLike()
    {
        this.like++;
    }

    public void addUnLike()
    {
        this.unlike++;
    }


    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    public int getUnlike() {
        return unlike;
    }

    public void setUnlike(int unlike) {
        this.unlike = unlike;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContents() {
        return contents;
    }

    public void setContents(String contents) {
        this.contents = contents;
    }

    @Override
    public String toString() {
        return "MeetingItem{" +
                "name='" + name + '\'' +
                ", contents='" + contents + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MeetingItem that = (MeetingItem) o;
        return Objects.equals(name, that.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }
}
